﻿using System;
using Extreme.SPFramework.DomainModel;

namespace Extreme.SPFramework.Test.Entities
{
    /// <summary>
    /// Test case entity
    /// </summary>
    public partial class Case : LinqEntityBase
    {
        public override Guid?  UniqueId
        {
	        get { return Id; }
	        set { Id = value.GetValueOrDefault(); }
        }

        public override void Detach()
        {
            if (base.Attached.HasValue && !base.Attached.Value)
                return;
            base.Detach();

            this._Insurer = Detach(this._Insurer);
        }

        public override void Attach(System.Data.Linq.DataContext context)
        {
            if (base.Attached.HasValue && base.Attached.Value)
                return;
            base.Attach(context);
        }
    }
}
